package com.itany.corejava.day14;

import java.io.FileReader;

public class TestFileReader {


    public static void main(String[] args) {

        try(FileReader fr=new FileReader("d:/a.txt")){

            System.out.println(fr.getEncoding());


            char[] c=new char[1000];

            int n;

            while((n=fr.read(c))!=-1){
                System.out.print(new String(c,0,n));
            }

        }catch (Exception e){
            e.printStackTrace();
        }


    }


}
